/*
 Navicat Premium Dump SQL

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80031 (8.0.31)
 Source Host           : localhost:3306
 Source Schema         : joblinker

 Target Server Type    : MySQL
 Target Server Version : 80031 (8.0.31)
 File Encoding         : 65001

 Date: 21/03/2025 16:05:23
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for chat_message
-- ----------------------------
DROP TABLE IF EXISTS `chat_message`;
CREATE TABLE `chat_message` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '消息ID',
  `job_id` bigint NOT NULL COMMENT '职位ID',
  `sender_id` bigint NOT NULL COMMENT '发送者ID',
  `receiver_id` bigint NOT NULL COMMENT '接收者ID',
  `content` text NOT NULL COMMENT '消息内容',
  `is_read` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已读(0-未读，1-已读)',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_job_id` (`job_id`),
  KEY `idx_sender_id` (`sender_id`),
  KEY `idx_receiver_id` (`receiver_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='聊天消息表';

-- ----------------------------
-- Records of chat_message
-- ----------------------------
BEGIN;
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (1, 4, 16, 15, '您好', 0, '2025-03-20 00:10:19', '2025-03-20 00:10:19');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (2, 4, 15, 15, '您好', 0, '2025-03-20 00:10:59', '2025-03-20 00:10:59');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (3, 4, 16, 15, '您好', 0, '2025-03-20 00:11:34', '2025-03-20 00:11:34');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (4, 4, 15, 15, '您好', 0, '2025-03-20 00:11:43', '2025-03-20 00:11:43');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (5, 4, 16, 15, '您好', 0, '2025-03-20 00:13:38', '2025-03-20 00:13:38');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (6, 4, 15, 16, '您好', 0, '2025-03-20 00:13:52', '2025-03-20 00:13:52');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (7, 4, 16, 15, '我想应聘这个岗位', 0, '2025-03-20 00:14:07', '2025-03-20 00:14:07');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (8, 4, 15, 16, '发一份你的简历给我', 0, '2025-03-20 00:14:22', '2025-03-20 00:14:22');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (9, 4, 16, 15, '已经投递', 0, '2025-03-20 08:47:21', '2025-03-20 08:47:21');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (10, 4, 1, 15, '你好，这个岗位还招人吗', 0, '2025-03-20 16:36:44', '2025-03-20 16:36:44');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (11, 4, 15, 16, '您好 招人的', 0, '2025-03-20 16:37:00', '2025-03-20 16:37:00');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (12, 4, 3, 15, '您好', 0, '2025-03-21 11:48:23', '2025-03-21 11:48:23');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (13, 4, 15, 3, '您好啊管理员', 0, '2025-03-21 11:48:50', '2025-03-21 11:48:50');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (14, 4, 3, 15, '我想要进行投递', 0, '2025-03-21 11:49:22', '2025-03-21 11:49:22');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (15, 4, 15, 3, '可以的', 0, '2025-03-21 11:49:41', '2025-03-21 11:49:41');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (16, 4, 3, 15, '你们公司待遇怎么样', 0, '2025-03-21 11:56:01', '2025-03-21 11:56:01');
INSERT INTO `chat_message` (`id`, `job_id`, `sender_id`, `receiver_id`, `content`, `is_read`, `create_time`, `update_time`) VALUES (17, 4, 15, 3, '待遇很好啊', 0, '2025-03-21 11:56:23', '2025-03-21 11:56:23');
COMMIT;

-- ----------------------------
-- Table structure for company
-- ----------------------------
DROP TABLE IF EXISTS `company`;
CREATE TABLE `company` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint NOT NULL COMMENT '创建者ID',
  `name` varchar(100) NOT NULL COMMENT '公司名称',
  `description` varchar(500) DEFAULT NULL COMMENT '公司描述',
  `address` varchar(200) DEFAULT NULL COMMENT '公司地址',
  `website` varchar(100) DEFAULT NULL COMMENT '公司网站',
  `phone` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `email` varchar(100) DEFAULT NULL COMMENT '联系邮箱',
  `size` varchar(20) DEFAULT NULL COMMENT '公司规模',
  `industry` varchar(50) DEFAULT NULL COMMENT '所属行业',
  `logo` varchar(200) DEFAULT NULL COMMENT '公司Logo',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态（0-待审核 1-正常 2-禁用）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_name` (`name`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='公司表';

-- ----------------------------
-- Records of company
-- ----------------------------
BEGIN;
INSERT INTO `company` (`id`, `user_id`, `name`, `description`, `address`, `website`, `phone`, `email`, `size`, `industry`, `logo`, `status`, `create_time`, `update_time`, `deleted`) VALUES (3, 13, '测试互联网科技公司', '互联网科技公司', '测试地址', '测试网站', '15126251776', '2452143632@qq.com', '50-99人', '互联网/IT', '', 1, '2025-03-19 15:59:30', '2025-03-19 15:59:30', 0);
INSERT INTO `company` (`id`, `user_id`, `name`, `description`, `address`, `website`, `phone`, `email`, `size`, `industry`, `logo`, `status`, `create_time`, `update_time`, `deleted`) VALUES (4, 15, '广东盛宏科技有限公司', '一般项目：技术服务、技术开发、技术咨询、技术交流、技术转让、技术推广；网络与信息安全软件开发；人工智能应用软件开发；物联网技术研发；信息系统集成服务；软件外包服务；计算机软硬件及辅助设备零售；信息安全设备销售；互联网销售（除销售需要许可的商品）；计算机软硬件及辅助设备批发；货币专用设备销售；信息系统运行维护服务；劳务服务（不含劳务派遣）；技术进出口（除依法须经批准的项目外，凭营业执照依法自主开展经营活动）', '惠州市南坛东路5号6楼', 'www.baidu.com', '15654321234', 'test@qq.com', '少于50人', '互联网/IT', '', 1, '2025-03-19 20:06:38', '2025-03-19 20:06:38', 0);
COMMIT;

-- ----------------------------
-- Table structure for company_job_fair
-- ----------------------------
DROP TABLE IF EXISTS `company_job_fair`;
CREATE TABLE `company_job_fair` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `company_id` bigint NOT NULL COMMENT '企业ID',
  `job_fair_id` bigint NOT NULL COMMENT '招聘会ID',
  `register_time` datetime NOT NULL COMMENT '报名时间',
  `booth_number` varchar(50) DEFAULT NULL COMMENT '展位号',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态（0-已报名 1-已确认 2-已取消）',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_company_job_fair` (`company_id`,`job_fair_id`),
  KEY `idx_job_fair_id` (`job_fair_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='企业招聘会报名表';

-- ----------------------------
-- Records of company_job_fair
-- ----------------------------
BEGIN;
INSERT INTO `company_job_fair` (`id`, `company_id`, `job_fair_id`, `register_time`, `booth_number`, `status`, `create_time`, `update_time`) VALUES (1, 4, 1, '2025-03-21 00:55:45', NULL, 1, '2025-03-21 00:55:45', '2025-03-21 00:55:45');
INSERT INTO `company_job_fair` (`id`, `company_id`, `job_fair_id`, `register_time`, `booth_number`, `status`, `create_time`, `update_time`) VALUES (2, 4, 2, '2025-03-21 12:04:13', NULL, 1, '2025-03-21 12:04:13', '2025-03-21 12:04:13');
COMMIT;

-- ----------------------------
-- Table structure for forum_board
-- ----------------------------
DROP TABLE IF EXISTS `forum_board`;
CREATE TABLE `forum_board` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '板块ID',
  `name` varchar(50) NOT NULL COMMENT '板块名称',
  `description` varchar(255) NOT NULL COMMENT '板块描述',
  `icon` varchar(50) NOT NULL COMMENT '板块图标',
  `color` varchar(20) NOT NULL COMMENT '板块颜色',
  `moderator_id` bigint DEFAULT NULL COMMENT '版主ID',
  `moderator_name` varchar(50) DEFAULT NULL COMMENT '版主名称',
  `sort_order` int NOT NULL DEFAULT '0' COMMENT '排序',
  `topic_count` int NOT NULL DEFAULT '0' COMMENT '话题数量',
  `post_count` int NOT NULL DEFAULT '0' COMMENT '帖子数量',
  `latest_topic_id` bigint DEFAULT NULL COMMENT '最新话题ID',
  `latest_topic_title` varchar(100) DEFAULT NULL COMMENT '最新话题标题',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`),
  KEY `idx_moderator_id` (`moderator_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='论坛板块表';

-- ----------------------------
-- Records of forum_board
-- ----------------------------
BEGIN;
INSERT INTO `forum_board` (`id`, `name`, `description`, `icon`, `color`, `moderator_id`, `moderator_name`, `sort_order`, `topic_count`, `post_count`, `latest_topic_id`, `latest_topic_title`, `create_time`, `update_time`, `deleted`) VALUES (1, '求职讨论', '分享求职经验，讨论面试技巧，解答求职困惑', 'Briefcase', '#3498db', 1, '职场顾问张三', 1, 1, 0, NULL, '', '2025-03-19 18:03:29', '2025-03-21 11:20:24', 0);
INSERT INTO `forum_board` (`id`, `name`, `description`, `icon`, `color`, `moderator_id`, `moderator_name`, `sort_order`, `topic_count`, `post_count`, `latest_topic_id`, `latest_topic_title`, `create_time`, `update_time`, `deleted`) VALUES (2, '薪资福利', '探讨各行业薪资水平，福利待遇，薪酬谈判', 'Coin', '#e74c3c', 2, '人力资源专家李四', 2, 0, 1, 10, '测试标题哦', '2025-03-19 18:03:29', '2025-03-21 11:23:33', 0);
INSERT INTO `forum_board` (`id`, `name`, `description`, `icon`, `color`, `moderator_id`, `moderator_name`, `sort_order`, `topic_count`, `post_count`, `latest_topic_id`, `latest_topic_title`, `create_time`, `update_time`, `deleted`) VALUES (3, '职业培训', '分享学习资源，职业技能提升，证书考试经验', 'School', '#9b59b6', 3, '培训讲师王五', 3, 0, 0, NULL, NULL, '2025-03-19 18:03:29', '2025-03-19 18:03:29', 0);
INSERT INTO `forum_board` (`id`, `name`, `description`, `icon`, `color`, `moderator_id`, `moderator_name`, `sort_order`, `topic_count`, `post_count`, `latest_topic_id`, `latest_topic_title`, `create_time`, `update_time`, `deleted`) VALUES (4, '简历指导', '简历撰写技巧，简历修改建议，简历优化分享', 'Reading', '#2ecc71', 4, '资深HR赵六', 4, 0, 0, NULL, NULL, '2025-03-19 18:03:29', '2025-03-19 18:03:29', 0);
INSERT INTO `forum_board` (`id`, `name`, `description`, `icon`, `color`, `moderator_id`, `moderator_name`, `sort_order`, `topic_count`, `post_count`, `latest_topic_id`, `latest_topic_title`, `create_time`, `update_time`, `deleted`) VALUES (5, '公司点评', '分享公司内部环境，文化氛围，真实体验', 'OfficeBuilding', '#f39c12', 5, '职场观察员小明', 5, 0, 0, NULL, '', '2025-03-19 18:03:29', '2025-03-21 11:22:39', 0);
INSERT INTO `forum_board` (`id`, `name`, `description`, `icon`, `color`, `moderator_id`, `moderator_name`, `sort_order`, `topic_count`, `post_count`, `latest_topic_id`, `latest_topic_title`, `create_time`, `update_time`, `deleted`) VALUES (6, '职业规划', '探讨职业发展方向，职业转型经验，长期规划', 'Guide', '#16a085', 6, '职业规划师小红', 6, 1, 0, NULL, '', '2025-03-19 18:03:29', '2025-03-21 11:20:33', 0);
COMMIT;

-- ----------------------------
-- Table structure for forum_reply
-- ----------------------------
DROP TABLE IF EXISTS `forum_reply`;
CREATE TABLE `forum_reply` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '回复ID',
  `content` text NOT NULL COMMENT '回复内容',
  `user_id` bigint DEFAULT NULL,
  `topic_id` bigint NOT NULL COMMENT '话题ID',
  `parent_id` bigint DEFAULT NULL COMMENT '父回复ID，用于回复的回复',
  `vote_count` int NOT NULL DEFAULT '0' COMMENT '点赞数',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态：0-正常，1-禁用',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`),
  KEY `idx_author_id` (`user_id`),
  KEY `idx_topic_id` (`topic_id`),
  KEY `idx_parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='论坛回复表';

-- ----------------------------
-- Records of forum_reply
-- ----------------------------
BEGIN;
INSERT INTO `forum_reply` (`id`, `content`, `user_id`, `topic_id`, `parent_id`, `vote_count`, `status`, `create_time`, `update_time`, `deleted`) VALUES (10, '拿到offce了', 3, 3, NULL, 0, 0, '2025-03-21 10:52:00', '2025-03-21 10:52:00', 0);
INSERT INTO `forum_reply` (`id`, `content`, `user_id`, `topic_id`, `parent_id`, `vote_count`, `status`, `create_time`, `update_time`, `deleted`) VALUES (11, '恭喜你啊太好了', 15, 3, 10, 0, 0, '2025-03-21 10:52:34', '2025-03-21 10:52:34', 0);
INSERT INTO `forum_reply` (`id`, `content`, `user_id`, `topic_id`, `parent_id`, `vote_count`, `status`, `create_time`, `update_time`, `deleted`) VALUES (12, '大家后啊啊啊啊', 3, 10, NULL, 1, 0, '2025-03-21 11:10:07', '2025-03-21 11:10:07', 0);
INSERT INTO `forum_reply` (`id`, `content`, `user_id`, `topic_id`, `parent_id`, `vote_count`, `status`, `create_time`, `update_time`, `deleted`) VALUES (13, '您好是真的吗', 3, 10, 12, 0, 0, '2025-03-21 11:21:44', '2025-03-21 11:21:44', 0);
COMMIT;

-- ----------------------------
-- Table structure for forum_topic
-- ----------------------------
DROP TABLE IF EXISTS `forum_topic`;
CREATE TABLE `forum_topic` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '话题ID',
  `title` varchar(100) NOT NULL COMMENT '话题标题',
  `content` text NOT NULL COMMENT '话题内容',
  `excerpt` varchar(255) DEFAULT NULL COMMENT '摘要',
  `user_id` bigint DEFAULT NULL,
  `board_id` bigint NOT NULL COMMENT '所属板块ID',
  `view_count` int NOT NULL DEFAULT '0' COMMENT '浏览次数',
  `reply_count` int NOT NULL DEFAULT '0' COMMENT '回复次数',
  `vote_count` int NOT NULL DEFAULT '0' COMMENT '点赞数',
  `is_top` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否置顶',
  `is_essence` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否精华',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态：0-正常，1-禁用',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `views` int DEFAULT '0' COMMENT '浏览次数',
  `replies` int DEFAULT '0' COMMENT '回复次数',
  `votes` int DEFAULT '0' COMMENT '点赞次数',
  `last_reply_time` datetime DEFAULT NULL COMMENT '最近回复时间',
  PRIMARY KEY (`id`),
  KEY `idx_author_id` (`user_id`),
  KEY `idx_board_id` (`board_id`),
  KEY `idx_create_time` (`create_time`),
  KEY `idx_vote_count` (`vote_count`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='论坛话题表';

-- ----------------------------
-- Records of forum_topic
-- ----------------------------
BEGIN;
INSERT INTO `forum_topic` (`id`, `title`, `content`, `excerpt`, `user_id`, `board_id`, `view_count`, `reply_count`, `vote_count`, `is_top`, `is_essence`, `status`, `create_time`, `update_time`, `deleted`, `views`, `replies`, `votes`, `last_reply_time`) VALUES (7, '测试3333', '后端分离的架构，通过RESTful API实现客户端与服务器端的数据交互，这一设计将在保障系统性能的同时，提升用户的操作流畅感，使得用户在预约课程和浏览信息时，能够获得更加快速和便捷的体验。\n在数据库设计上，本项团队可以信息不对称、效率', NULL, 3, 1, 40, -2, 0, 0, 0, 0, '2025-03-21 09:51:11', '2025-03-21 10:51:41', 1, 0, 0, 0, '2025-03-21 10:46:08');
INSERT INTO `forum_topic` (`id`, `title`, `content`, `excerpt`, `user_id`, `board_id`, `view_count`, `reply_count`, `vote_count`, `is_top`, `is_essence`, `status`, `create_time`, `update_time`, `deleted`, `views`, `replies`, `votes`, `last_reply_time`) VALUES (8, '测试22222', '后端分离的架构，通过RESTful API实现客户端与服务器端的数据交互，这一设计将在保障系统性能的同时，提升用户的操作流畅感，使得用户在预约课程和浏览信息时，能够获得更加快速和便捷的体验。\n在数据库设计上，本项团队可以信息不对称、效率', NULL, 3, 1, 11, 0, 0, 0, 0, 0, '2025-03-21 10:07:19', '2025-03-21 10:37:17', 1, 0, 0, 0, NULL);
INSERT INTO `forum_topic` (`id`, `title`, `content`, `excerpt`, `user_id`, `board_id`, `view_count`, `reply_count`, `vote_count`, `is_top`, `is_essence`, `status`, `create_time`, `update_time`, `deleted`, `views`, `replies`, `votes`, `last_reply_time`) VALUES (9, '测试222', '最近看到很多帖子说互联网寒冬，跳槽薪资普遍下降，想了解一下大家的真实情况，今年跳槽的小伙伴薪资涨幅如何？我在北京某中型互联网公司，最近面试了几家公司，感觉offer都不太理想，大家是否也有类似的经历？', NULL, 3, 2, 11, 2, 0, 0, 0, 0, '2025-03-21 10:38:59', '2025-03-21 10:42:57', 1, 0, 0, 0, '2025-03-21 10:41:03');
INSERT INTO `forum_topic` (`id`, `title`, `content`, `excerpt`, `user_id`, `board_id`, `view_count`, `reply_count`, `vote_count`, `is_top`, `is_essence`, `status`, `create_time`, `update_time`, `deleted`, `views`, `replies`, `votes`, `last_reply_time`) VALUES (10, '测试标题哦', '我也在北京，今年跳槽薪资确实不如往年，大部分人涨幅在20%左右，少数人能到30%，但几乎没有看到50%以上的了。互联网整体融资环境不好，大厂也在控制成本。', NULL, 3, 2, 27, 2, 1, 0, 0, 0, '2025-03-21 11:06:24', '2025-03-21 11:22:05', 0, 0, 0, 0, '2025-03-21 11:21:44');
INSERT INTO `forum_topic` (`id`, `title`, `content`, `excerpt`, `user_id`, `board_id`, `view_count`, `reply_count`, `vote_count`, `is_top`, `is_essence`, `status`, `create_time`, `update_time`, `deleted`, `views`, `replies`, `votes`, `last_reply_time`) VALUES (11, '测试一下求职指南模块', '请确保您的话题与所选板块相关，发布在合适的板块有助于获得更多回复。\n标题应简明扼要，能清晰表达您要讨论的主题。\n内容应详实，提供足够的信息让他人理解您的问题或观点。\n请尊重他人，不要发布含有攻击性、侮辱性的言论。\n', NULL, 3, 1, 5, 0, 1, 0, 0, 0, '2025-03-21 11:38:46', '2025-03-21 11:38:46', 0, 0, 0, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for forum_vote
-- ----------------------------
DROP TABLE IF EXISTS `forum_vote`;
CREATE TABLE `forum_vote` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '点赞ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `target_id` bigint NOT NULL COMMENT '目标ID',
  `target_type` tinyint NOT NULL COMMENT '目标类型：1-话题，2-回复',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `type` tinyint NOT NULL DEFAULT '1' COMMENT '投票类型：1-话题点赞，2-回复点赞',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_user_target` (`user_id`,`target_id`,`target_type`),
  KEY `idx_target` (`target_id`,`target_type`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='论坛点赞表';

-- ----------------------------
-- Records of forum_vote
-- ----------------------------
BEGIN;
INSERT INTO `forum_vote` (`id`, `user_id`, `target_id`, `target_type`, `create_time`, `deleted`, `type`) VALUES (1, 3, 10, 1, '2025-03-21 11:09:38', 0, 1);
INSERT INTO `forum_vote` (`id`, `user_id`, `target_id`, `target_type`, `create_time`, `deleted`, `type`) VALUES (2, 3, 12, 2, '2025-03-21 11:10:09', 0, 2);
INSERT INTO `forum_vote` (`id`, `user_id`, `target_id`, `target_type`, `create_time`, `deleted`, `type`) VALUES (3, 15, 11, 1, '2025-03-21 13:54:21', 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for interview
-- ----------------------------
DROP TABLE IF EXISTS `interview`;
CREATE TABLE `interview` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `application_id` bigint NOT NULL COMMENT '职位申请ID',
  `interview_time` datetime NOT NULL COMMENT '面试时间',
  `location` varchar(255) NOT NULL COMMENT '面试地点',
  `type` varchar(50) NOT NULL COMMENT '面试方式（线上、线下）',
  `link` varchar(255) DEFAULT NULL COMMENT '面试链接（线上面试时使用）',
  `interviewer` varchar(100) NOT NULL COMMENT '面试官',
  `round` int NOT NULL DEFAULT '1' COMMENT '面试轮次',
  `status` int NOT NULL DEFAULT '0' COMMENT '面试状态（0-待确认 1-已确认 2-已完成 3-已取消）',
  `feedback` text COMMENT '面试反馈',
  `rating` int DEFAULT NULL COMMENT '评分（1-5）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_application_id` (`application_id`),
  KEY `idx_interview_time` (`interview_time`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='面试表';

-- ----------------------------
-- Records of interview
-- ----------------------------
BEGIN;
INSERT INTO `interview` (`id`, `application_id`, `interview_time`, `location`, `type`, `link`, `interviewer`, `round`, `status`, `feedback`, `rating`, `create_time`, `update_time`, `deleted`) VALUES (1, 3, '2025-03-27 00:00:00', '测试地点', 'ONSITE', '', '李四', 1, 0, NULL, NULL, '2025-03-21 00:05:46', '2025-03-21 00:05:46', 0);
COMMIT;

-- ----------------------------
-- Table structure for job
-- ----------------------------
DROP TABLE IF EXISTS `job`;
CREATE TABLE `job` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint NOT NULL COMMENT '发布者用户ID',
  `company_id` bigint NOT NULL COMMENT '公司ID',
  `category_id` bigint DEFAULT NULL COMMENT '职位分类ID',
  `title` varchar(100) NOT NULL COMMENT '职位标题',
  `description` text NOT NULL COMMENT '职位描述',
  `requirement` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `salary` varchar(50) NOT NULL COMMENT '薪资范围',
  `city` varchar(50) NOT NULL COMMENT '工作城市',
  `address` varchar(200) DEFAULT NULL COMMENT '详细地址',
  `experience` varchar(50) DEFAULT NULL COMMENT '工作经验要求',
  `education` varchar(50) DEFAULT NULL COMMENT '学历要求',
  `tags` varchar(200) DEFAULT NULL COMMENT '职位标签',
  `view_count` int NOT NULL DEFAULT '0' COMMENT '浏览次数',
  `apply_count` int NOT NULL DEFAULT '0' COMMENT '申请次数',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态（0-草稿 1-发布 2-下架）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_company_id` (`company_id`),
  KEY `idx_category_id` (`category_id`),
  KEY `idx_city` (`city`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='职位表';

-- ----------------------------
-- Records of job
-- ----------------------------
BEGIN;
INSERT INTO `job` (`id`, `user_id`, `company_id`, `category_id`, `title`, `description`, `requirement`, `salary`, `city`, `address`, `experience`, `education`, `tags`, `view_count`, `apply_count`, `status`, `create_time`, `update_time`, `deleted`) VALUES (4, 15, 4, 2, '初级java开发', '1、大专及以上学历，计算机相关专业； \n2、1-3年及以上的Java开发经验，熟悉常用的数据结构和算法，熟悉git开发流程； \n3、了解Springboot，SpringCloud/Alibaba cloud微服务框架并在实际项目中使用过 \n4、熟练SSM，有mybatis plus经验最好； \n5、熟悉MySQL/Postgrsql, Redis, MongoDB, Kafka/rabbitmq/rocketmq等mq，ES等开源中间件使用； \n6、熟悉常用设计模式；', '本科985、211', '8k-15k', '广州', NULL, '应届生', '本科', 'java,mysql,微服务', 165, 0, 1, '2025-03-19 20:13:52', '2025-03-19 20:13:52', 0);
COMMIT;

-- ----------------------------
-- Table structure for job_application
-- ----------------------------
DROP TABLE IF EXISTS `job_application`;
CREATE TABLE `job_application` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `job_id` bigint NOT NULL COMMENT '职位ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `resume_id` bigint NOT NULL COMMENT '简历ID',
  `status` int NOT NULL DEFAULT '0' COMMENT '申请状态（0-待处理 1-已查看 2-待面试 3-已通过 4-已拒绝）',
  `process_time` datetime DEFAULT NULL COMMENT '处理时间',
  `process_note` varchar(255) DEFAULT NULL COMMENT '处理备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_job_id` (`job_id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_resume_id` (`resume_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='职位申请表';

-- ----------------------------
-- Records of job_application
-- ----------------------------
BEGIN;
INSERT INTO `job_application` (`id`, `job_id`, `user_id`, `resume_id`, `status`, `process_time`, `process_note`, `create_time`, `update_time`, `deleted`) VALUES (3, 4, 16, 6, 2, '2025-03-21 00:05:46', '面试时间: 2025-03-27 00:00', '2025-03-20 16:31:21', '2025-03-20 22:09:42', 0);
COMMIT;

-- ----------------------------
-- Table structure for job_category
-- ----------------------------
DROP TABLE IF EXISTS `job_category`;
CREATE TABLE `job_category` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(50) NOT NULL COMMENT '分类名称',
  `parent_id` bigint DEFAULT '0' COMMENT '父分类ID',
  `level` int NOT NULL DEFAULT '1' COMMENT '分类级别',
  `sort` int NOT NULL DEFAULT '0' COMMENT '排序',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态（0-禁用 1-启用）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` int NOT NULL DEFAULT '0' COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`),
  KEY `idx_parent_id` (`parent_id`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='职位分类表';

-- ----------------------------
-- Records of job_category
-- ----------------------------
BEGIN;
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (1, '技术', 0, 1, 1, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (2, '产品', 0, 1, 2, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (3, '设计', 0, 1, 3, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (4, '运营', 0, 1, 4, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (5, '市场', 0, 1, 5, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (6, '销售', 0, 1, 6, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (7, '财务', 0, 1, 7, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (8, '人力资源', 0, 1, 8, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (9, '行政', 0, 1, 9, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (10, '法务', 0, 1, 10, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (11, '高级管理', 0, 1, 11, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (12, 'Java开发', 1, 2, 1, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (13, 'C++开发', 1, 2, 2, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (14, 'PHP开发', 1, 2, 3, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (15, '前端开发', 1, 2, 4, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (16, '测试工程师', 1, 2, 5, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (17, '运维工程师', 1, 2, 6, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (18, '数据分析师', 1, 2, 7, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (19, '产品经理', 2, 2, 1, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (20, '产品助理', 2, 2, 2, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (21, 'UI设计师', 3, 2, 1, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (22, '平面设计师', 3, 2, 2, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (23, '网络运营', 4, 2, 1, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (24, '内容运营', 4, 2, 2, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (25, '市场推广', 5, 2, 1, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
INSERT INTO `job_category` (`id`, `name`, `parent_id`, `level`, `sort`, `status`, `create_time`, `update_time`, `deleted`) VALUES (26, '市场策划', 5, 2, 2, 1, '2025-03-19 10:31:28', '2025-03-19 10:31:28', 0);
COMMIT;

-- ----------------------------
-- Table structure for job_fair
-- ----------------------------
DROP TABLE IF EXISTS `job_fair`;
CREATE TABLE `job_fair` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `title` varchar(200) NOT NULL COMMENT '招聘会标题',
  `location` varchar(255) NOT NULL COMMENT '招聘会地点',
  `start_time` datetime NOT NULL COMMENT '招聘会开始时间',
  `end_time` datetime NOT NULL COMMENT '招聘会结束时间',
  `company_limit` int NOT NULL DEFAULT '100' COMMENT '企业容量上限',
  `user_limit` int NOT NULL DEFAULT '1000' COMMENT '求职者容量上限',
  `description` text COMMENT '招聘会描述',
  `notice` text COMMENT '参会须知',
  `contact` text COMMENT '联系方式',
  `registered_companies` int NOT NULL DEFAULT '0' COMMENT '已报名企业数量',
  `registered_users` int NOT NULL DEFAULT '0' COMMENT '已报名求职者数量',
  `type` tinyint NOT NULL DEFAULT '0' COMMENT '招聘会类型（0-线下 1-线上）',
  `industries` varchar(255) DEFAULT NULL COMMENT '招聘会行业（可多选，逗号分隔的行业ID）',
  `address` varchar(255) DEFAULT NULL COMMENT '详细地址（线下招聘会使用）',
  `poster` varchar(1000) DEFAULT NULL COMMENT '海报URL',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态（0-未开始 1-进行中 2-已结束 3-已取消）',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '逻辑删除（0-未删除 1-已删除）',
  PRIMARY KEY (`id`),
  KEY `idx_status` (`status`),
  KEY `idx_start_time` (`start_time`),
  KEY `idx_end_time` (`end_time`),
  KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='招聘会信息表';

-- ----------------------------
-- Records of job_fair
-- ----------------------------
BEGIN;
INSERT INTO `job_fair` (`id`, `title`, `location`, `start_time`, `end_time`, `company_limit`, `user_limit`, `description`, `notice`, `contact`, `registered_companies`, `registered_users`, `type`, `industries`, `address`, `poster`, `status`, `create_time`, `update_time`, `deleted`) VALUES (1, '2025测试招聘会', '重庆', '2025-03-20 00:00:00', '2025-03-22 00:00:00', 100, 1000, '招聘会介绍', '参加会议须知', '15126251889', 1, 9, 1, '1,2', NULL, 'https://img1.baidu.com/it/u=1510973810,2814266367&fm=253&fmt=auto&app=138&f=JPEG?w=1600&h=800', 0, '2025-03-19 17:03:45', '2025-03-21 00:55:45', 0);
INSERT INTO `job_fair` (`id`, `title`, `location`, `start_time`, `end_time`, `company_limit`, `user_limit`, `description`, `notice`, `contact`, `registered_companies`, `registered_users`, `type`, `industries`, `address`, `poster`, `status`, `create_time`, `update_time`, `deleted`) VALUES (2, '2025校园招聘会', '学校操场', '2025-03-30 00:00:00', '2025-03-31 00:00:00', 100, 1000, '测试', '测试', '测试', 1, 0, 0, '1,2', 'XX学校操场', 'https://img2.baidu.com/it/u=2356488002,1896042801&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500', 0, '2025-03-21 09:27:42', '2025-03-21 12:04:13', 0);
COMMIT;

-- ----------------------------
-- Table structure for job_favorites
-- ----------------------------
DROP TABLE IF EXISTS `job_favorites`;
CREATE TABLE `job_favorites` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `job_id` bigint NOT NULL COMMENT '职位ID',
  `create_time` datetime NOT NULL COMMENT '收藏时间',
  PRIMARY KEY (`user_id`,`job_id`),
  KEY `idx_job_id` (`job_id`),
  KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='职位收藏表';

-- ----------------------------
-- Records of job_favorites
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for resume
-- ----------------------------
DROP TABLE IF EXISTS `resume`;
CREATE TABLE `resume` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `name` varchar(50) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `age` int DEFAULT NULL,
  `gender` varchar(10) DEFAULT NULL,
  `education` varchar(50) DEFAULT NULL,
  `school` varchar(100) DEFAULT NULL,
  `major` varchar(100) DEFAULT NULL,
  `graduation_year` int DEFAULT NULL,
  `work_experience` text,
  `project_experience` text,
  `skills` text,
  `certificates` text,
  `self_evaluation` text,
  `attachment_url` varchar(255) DEFAULT NULL,
  `status` int DEFAULT '0',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `location` varchar(100) DEFAULT NULL,
  `birthday` date DEFAULT NULL,
  `work_years` varchar(255) DEFAULT NULL,
  `job_expectation` text,
  `school_start_date` varchar(255) DEFAULT NULL,
  `school_end_date` varchar(20) DEFAULT NULL COMMENT '教育背景的在校结束时间',
  `school_experience` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `is_default` varchar(255) DEFAULT NULL,
  `languages` varchar(255) DEFAULT NULL COMMENT '语言能力',
  PRIMARY KEY (`id`),
  KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of resume
-- ----------------------------
BEGIN;
INSERT INTO `resume` (`id`, `user_id`, `name`, `phone`, `email`, `age`, `gender`, `education`, `school`, `major`, `graduation_year`, `work_experience`, `project_experience`, `skills`, `certificates`, `self_evaluation`, `attachment_url`, `status`, `create_time`, `update_time`, `title`, `location`, `birthday`, `work_years`, `job_expectation`, `school_start_date`, `school_end_date`, `school_experience`, `is_default`, `languages`) VALUES (6, 16, '张三', '15126251887', '123@qq.com', NULL, '男', '博士', '重庆大学', '计算机科学', 0, '{\"company\":\"阿里巴巴有限公司\",\"position\":\"产品经理\",\"startDate\":\"2025-01-01\",\"endDate\":\"2025-02-01\",\"description\":\"产品经理描述需求，与工程师沟通需求\"}', '{\"name\":\"测试\",\"role\":\"产品经理\",\"startDate\":\"2023-01-01\",\"endDate\":\"2025-01-01\",\"description\":\"11111111111111\"}', 'java', '软件设计师, 数据库工程师', '', NULL, 0, '2025-03-20 13:05:14', '2025-03-20 15:27:12', '后端开发工程师', '北京市', '2001-03-20', '应届生', '{\"salary\":\"10-15k\",\"location\":\"北京市\",\"status\":\"应届生\"}', '2022-01-01', '2025-06-01', '国家奖学金', '1', '英语 - CET-6, 日语 - N2');
COMMIT;

-- ----------------------------
-- Table structure for resume_views
-- ----------------------------
DROP TABLE IF EXISTS `resume_views`;
CREATE TABLE `resume_views` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID',
  `resume_id` bigint NOT NULL COMMENT '简历ID',
  `viewer_id` bigint NOT NULL COMMENT '查看者ID',
  `view_time` datetime NOT NULL COMMENT '查看时间',
  PRIMARY KEY (`id`),
  KEY `idx_resume_id` (`resume_id`),
  KEY `idx_viewer_id` (`viewer_id`),
  KEY `idx_view_time` (`view_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='简历查看记录表';

-- ----------------------------
-- Records of resume_views
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `username` varchar(50) NOT NULL COMMENT '用户名',
  `password` varchar(32) NOT NULL COMMENT '密码（MD5加密）',
  `email` varchar(100) NOT NULL COMMENT '邮箱',
  `phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
  `role` int NOT NULL DEFAULT '0' COMMENT '角色（0-求职者 1-招聘者 2-管理员）',
  `company_id` bigint DEFAULT NULL COMMENT '关联的公司ID（招聘者角色）',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户状态（0-正常，1-禁用）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除（0-未删除，1-已删除）',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_username` (`username`),
  UNIQUE KEY `uk_email` (`email`),
  KEY `idx_user_type` (`role`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `password`, `email`, `phone`, `role`, `company_id`, `status`, `create_time`, `update_time`, `deleted`) VALUES (1, 'jobseeker', 'e10adc3949ba59abbe56e057f20f883e', 'jobseeker@test.com', '13811111111', 0, NULL, 0, '2025-03-18 22:53:40', '2025-03-18 22:57:25', 0);
INSERT INTO `user` (`id`, `username`, `password`, `email`, `phone`, `role`, `company_id`, `status`, `create_time`, `update_time`, `deleted`) VALUES (2, 'recruiter', 'e10adc3949ba59abbe56e057f20f883e', 'recruiter@test.com', '13822222222', 1, 1, 0, '2025-03-18 22:53:40', '2025-03-19 10:47:35', 0);
INSERT INTO `user` (`id`, `username`, `password`, `email`, `phone`, `role`, `company_id`, `status`, `create_time`, `update_time`, `deleted`) VALUES (3, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 'admin2@test.com', '13833333333', 2, NULL, 0, '2025-03-18 22:53:40', '2025-03-18 22:57:29', 0);
INSERT INTO `user` (`id`, `username`, `password`, `email`, `phone`, `role`, `company_id`, `status`, `create_time`, `update_time`, `deleted`) VALUES (15, 'xiaolei', 'e10adc3949ba59abbe56e057f20f883e', '123@qq.com', '15126251776', 1, 4, 0, '2025-03-19 20:00:46', '2025-03-21 16:01:27', 0);
INSERT INTO `user` (`id`, `username`, `password`, `email`, `phone`, `role`, `company_id`, `status`, `create_time`, `update_time`, `deleted`) VALUES (16, 'zhangsan', 'e10adc3949ba59abbe56e057f20f883e', '1234@qq.com', '15126543211', 0, NULL, 0, '2025-03-19 20:01:33', '2025-03-21 16:02:17', 0);
INSERT INTO `user` (`id`, `username`, `password`, `email`, `phone`, `role`, `company_id`, `status`, `create_time`, `update_time`, `deleted`) VALUES (17, 'testuser', '482c811da5d5b4bc6d497ffa98491e38', 'test@example.com', '13800138000', 0, NULL, 0, '2025-03-19 20:04:46', '2025-03-19 20:04:46', 0);
COMMIT;

-- ----------------------------
-- Table structure for user_job_fair
-- ----------------------------
DROP TABLE IF EXISTS `user_job_fair`;
CREATE TABLE `user_job_fair` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `job_fair_id` bigint NOT NULL COMMENT '招聘会ID',
  `register_time` datetime NOT NULL COMMENT '报名时间',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态（0-已报名 1-已签到 2-已取消）',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_user_job_fair` (`user_id`,`job_fair_id`),
  KEY `idx_job_fair_id` (`job_fair_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户招聘会报名表';

-- ----------------------------
-- Records of user_job_fair
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_todos
-- ----------------------------
DROP TABLE IF EXISTS `user_todos`;
CREATE TABLE `user_todos` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '待办ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `title` varchar(100) NOT NULL COMMENT '标题',
  `content` varchar(500) DEFAULT NULL COMMENT '内容',
  `type` varchar(20) NOT NULL COMMENT '类型(resume/application/job等)',
  `urgent` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否紧急',
  `action_text` varchar(20) DEFAULT '查看详情' COMMENT '操作文本',
  `related_id` bigint DEFAULT NULL COMMENT '关联ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `status` varchar(10) NOT NULL DEFAULT 'pending' COMMENT '状态(pending/completed)',
  PRIMARY KEY (`id`),
  KEY `idx_user_id_status` (`user_id`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户待办事项表';

-- ----------------------------
-- Records of user_todos
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
